package com.hr.controller;

import com.hr.pojo.Product;
import com.hr.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {
    @Autowired
    private ProductService productService;

    @GetMapping("/productList")

    public List<Product> productList(){
        return productService.getProductList();
    }
}
